@extends('layout.admin')

@section('title')
    <title>会员管理</title>
@endsection

@section('css')

@endsection
    
    
    
    
    
    
  
@section('content')  

<div class=" admin-content">
	
		<div class="daohang">
    </div>

<!-- -------------------------------------------------- 修改域 --------------------------------------------------- -->
<div class="am-modal am-modal-no-btn" tabindex="-1" id="doc-modal-1">
  <div class="am-modal-dialog">
    <div class="am-modal-hd">Modal 标题
      <a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close>&times;</a>
    </div>
    <div class="am-modal-bd am-text-left">
      
      <form class="am-form">
  <fieldset>
    <legend>添加会员</legend>

    <div class="am-form-group">
      <label for="doc-ipt-email-1">账号</label>
      <input type="email" class="" id="doc-ipt-email-1" placeholder="输入电子邮件">
    </div>

    <div class="am-form-group">
      <label for="doc-ipt-email-1">昵称</label>
      <input type="email" class="" id="doc-ipt-email-1" placeholder="输入电子邮件">
    </div>

    <div class="am-form-group">
      <label for="doc-ipt-pwd-1">密码</label>
      <input type="password" class="" id="doc-ipt-pwd-1" placeholder="设置个密码吧">
    </div>

    <div class="am-form-group">
      <label for="doc-ipt-pwd-1">确认密码</label>
      <input type="password" class="" id="doc-ipt-pwd-1" placeholder="设置个密码吧">
    </div>

    <div class="am-form-group am-form-file">
      <label for="doc-ipt-file-2">设置头像</label>
      <div>
        <button type="button" class="am-btn am-btn-default am-btn-sm">
          <i class="am-icon-cloud-upload"></i> 选择要上传的文件</button>
      </div>
      <input type="file" id="doc-ipt-file-2">
    </div>

    <p><button type="submit" class="am-btn am-btn-primary am-btn-block">添加</button></p>
  </fieldset>
</form>


    </div>
  </div>
</div>




<div class="admin-biaogelist">
	
    <div class="listbiaoti am-cf">
      <ul class="am-icon-users"> 会员管理</ul>
      
      <dl class="am-icon-home" style="float: right;">当前位置： 首页 > <a href="#">会员列表</a></dl>
        
      <!--这里打开的是新页面-->
</div>
    <div class="am-form am-g">
          <table width="100%" class="am-table am-table-bordered am-table-radius am-table-striped am-table-centered">
            <thead>
              <tr class="am-success">
                <th class="table-check am-text-center am-text-middle"><input type="checkbox" /></th>
                <th class="table-id am-text-center am-text-middle">ID</th>
                <th class="table-title am-text-center am-text-middle">会员名称</th>
                <th class="table-title am-text-center am-text-middle">头像</th>
                <th class="table-title am-text-center am-text-middle">邮箱</th>
                <th class="table-title am-text-center am-text-middle">phone</th>
                <th class="table-type am-text-center am-text-middle">会员状态</th>
                <th class="table-author am-text-center am-hide-sm-only am-text-middle">近期登录</th>
                <th width="130px" class="table-set am-text-center am-text-middle">操作</th>
              </tr>
            </thead>
            <tbody>
              @foreach($Members as $Member)
                <tr>
                  <td class="am-text-middle am-text-center"><input type="checkbox" /></td>
                  <td class="am-text-middle am-text-center">{{$Member->id}}</td>
                  <td class="am-text-middle am-text-center">{{$Member->nickName}}</td>
                  <td class="am-text-middle am-text-center"><img src="{{asset($Member->pic)}}" height="50" alt=""></td>
                  <td class="am-text-middle am-text-center">{{$Member->email}}</td>
                  <td class="am-text-middle am-text-center">{{$Member->phone}}</td>
                  <td class="am-text-middle am-text-center">{{$status[$Member->status]}}</td>
                  <td class="am-text-middle am-text-center">{{$Member->accesstime}}</td>
                  <td class="am-text-middle am-text-center">   	
                  	<div class="am-btn-toolbar">
                      <div class="am-btn-group am-btn-group-xs">
                        <a href="{{url('admin/Member/'.$Member->id)}}" class="am-btn am-btn-default am-btn-xs am-text-success am-round visitInfo" title="查看会员详情"><span class="am-icon-search"></span> </a>
                        <button type="button" class="am-btn am-btn-default am-btn-xs am-text-secondary am-round"  data-am-modal="{target: '#doc-modal-1'}" title="修改状态"><span class="am-icon-pencil-square-o"></span></button>
                        <button class="am-btn am-btn-default am-btn-xs am-text-danger am-round" title="删除会员"><span class="am-icon-trash-o" ></span></button>
                      </div>
                    </div>
                  </td>
                </tr>
              @endforeach
            </tbody>
          </table>
        <hr />
      </div>
 
 
@include('common.footer')


</div>

</div>
@endsection

@section('prompt')
    @if (count('errors'))
        @foreach ($errors->all() as $error)
            <div class='prompt fail'>
                    <p>{{ $error }}</p>
            </div>
        @endforeach
    @endif
@endsection

@section('js')
    <script type="text/javascript">
      $(function () {
        console.log($('.visitInfo'));
      });
    </script>
@endsection